<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="lib/daterangepicker/daterangepicker.css" /> 

<title>打印快递单</title>
<style type="text/css">
	body{
		min-height: auto;
	}
	/*.p_blank{
		width: 744px; height: 360px; background: url(/Manage/images/transpaperbg.jpg) center no-repeat; margin: 0 auto; padding-top: 80px; 
		padding-left: 56px; margin-top: 10px;
	}
	.p_content{
		width: 645px; height: 290px; border:#ff0000 8px solid;
	}
	.p_content .left{
		width: 315px; display: inline-block; height: 290px;  vertical-align: top;
	}
		.p_content .left .td_name{
			height: 25px; line-height: 25px; width: 100px; font-size: 14px; opacity: 0.8; display: inline-block;
			padding-left: 60px;
		}
		.p_content .left .td_area{
			height: 25px; line-height: 25px; width: 100px; font-size: 14px; opacity: 0.8; display: inline-block;
			padding-left: 45px;
		}
		.p_content .left .td_compayname{
			height: 23px; line-height: 23px; width: 260px; font-size: 12px; opacity: 0.8; display: inline-block;
			padding-left: 50px;
		}
		.p_content .left .td_address{
			height: 50px; line-height: 25px; width: 305px; font-size: 12px; opacity: 0.8; display: inline-block;
			 padding-top: 18px; padding-left: 5px;
		}
		.p_content .left .td_phone{
			height: 25px; line-height: 25px; width: 100px; font-size: 13px; opacity: 0.8; display: inline-block; color: #ff0000; font-weight: bold;
			padding-left: 60px;
		}
		.p_content .left .td_mobile{
			height: 25px; line-height: 25px; width: 115px; font-size: 14px; opacity: 0.8; display: inline-block; color: #ff0000; font-weight: bold;
			padding-left: 30px;
		}

	.p_content .right{
		width: 325px; display: inline-block; height: 290px; vertical-align: top;
	}
		.p_content .right .td_name{
			height: 25px; line-height: 25px; width: 115px; font-size: 14px; opacity: 0.8; display: inline-block; vertical-align: top;
			padding-left: 60px;
		}
		.p_content .right .td_area{
			height: 25px; line-height: 25px; width: 100px; font-size: 14px; opacity: 0.8; display: inline-block; vertical-align: top;
			padding-left: 45px;
		}
		.p_content .right .td_compayname{
			height: 23px; line-height: 23px; width: 260px; font-size: 12px; opacity: 0.8; display: inline-block; vertical-align: top;
			padding-left: 50px;
		}
		.p_content .right .td_address{
			height: 50px; line-height: 25px; width: 315px; font-size: 12px; opacity: 0.8; display: inline-block; vertical-align: top;
			 padding-top: 18px; padding-left: 5px;
		}
		.p_content .right .td_phone{
			height: 25px; line-height: 25px; width: 100px; font-size: 13px; opacity: 0.8; display: inline-block; color: #ff0000; font-weight: bold;
			padding-left: 80px; vertical-align: top;
		}
		.p_content .right .td_mobile{
			height: 25px; line-height: 25px; width: 110px; font-size: 14px; opacity: 0.8; display: inline-block; color: #ff0000; font-weight: bold;
			padding-left: 30px; vertical-align: top;
		}
	
	
	.p_btn{float: right; margin-right: 50px; margin-top: 30px; width: 100px;}*/
</style>
</head>
<body>
	<div class="p_blank" id="content">
		<!-- <div class="p_content">
			<div class="left">
				<div class="td_name">姓名</div>
				<div class="td_area">山东 临沂</div>
				<div class="td_compayname">山东省艾瑞斯电子商务有限公司</div>
				<div class="td_address">山东省艾瑞斯山东省艾瑞斯电子商务有限公司电子商务有限公司</div>
				<div class="td_phone">0539-8019546</div>
				<div class="td_mobile">13969940856</div>
			</div>
			<div class="right">
				<div class="td_name" id="r_name"></div>
				<div class="td_area" id="r_area"></div>
				<div class="td_compayname" id="r_compay"></div>
				<div class="td_address" id="r_address"></div>
				<div class="td_phone" id="r_phone"></div>
				<div class="td_mobile" id="r_mobile"></div>
			</div>
		</div> -->
	</div>
	<div class="row cl pr-20" style="position:fixed; bottom:10px; width: 200px; right: 10px; text-align: right; z-index:1000; ">
		<input class="btn btn-secondary radius p_btn" type="button" value="打印" id="btnprint">
	</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script>
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/template-native.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 
<script type="text/javascript" src="lib/laypage/laypage.js"></script> 
<script type="text/javascript">
function printme()
{

}

$(function(){

    var oid=getUrlParam('oid');

    if(typeof(oid)==undefined){
    	parent.parent.layer.msg("缺少参数", {icon:3,time:1000});
    }else{
    	var eidturl=API_MIANDAN+"?oid="+oid;

    	$.getJSON(eidturl,function(data){
    	    if(!checkStatus(data)) return;//判断登录

    	    if(data.datas==''){
    	        layer.msg("数据加载错误", {icon:2,time:1000});
    	    }else{
    	    	// console.log(data.datas.receiver)
    	     //    $("#r_name").text(data.datas.receiver);
    	     //    $("#r_mobile").text(data.datas.mobile);
    	     //    $("#r_address").text(data.datas.address);
    	     	var index = parent.layer.getFrameIndex(window.name);
    	        
    	        $("#content").html(data.datas.PrintTemplate);
    	        $("#btnprint").on('click',function(){

    	        	document.body.innerHTML=document.getElementById('content').innerHTML;
					window.print();
					parent.layer.close(index);     
    	        	
					// window.close();
    	        })
    	    }
    	    
    	})
    }


   





});



</script>
</body>
</html>